;;; GNU Guix --- Functional package management for GNU
;;;
;;; Copyright © 2022 jgart <jgart@dismail.de>
;;;
;;; This file is not part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (guixrus packages jam-stack)
  #:use-module (gnu packages)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix packages)
  #:use-module ((guixrus packages common lisp) #:prefix rus:)
  #:use-module (gnu packages lisp-xyz)
  #:use-module (gnu packages lisp-check)
  #:use-module (guix download)
  #:use-module (guix git-download)
  #:use-module (guix utils)
  #:use-module (guix build utils)
  #:use-module (guix build-system asdf))

(define-public sbcl-cl-site-gen
  (let ((commit "553f005cf3bb0a1b69e59d8f7e888ce481971e8a")
        (revision "0"))
    (package
      (name "sbcl-cl-site-gen")
      (version (git-version "0.1" revision commit))
      (source
       (origin
         (method git-fetch)
         (uri (git-reference
               (url "https://github.com/Gavinok/cl-site-gen")
               (commit commit)))
         (file-name (git-file-name name version))
         (sha256
          (base32 "1ncgpicl7pdxciadv6g219k3n3n0a0g60m7iw3jwfyqbcb5h44qz"))
         (modules '((guix build utils)))
         (snippet
           '(begin
              (delete-file "build.lisp") ; Makes a call to quicklisp.
              (delete-file "qlfile") ; Not needed since we're using GNU Guix.
              (delete-file "qlfile.lock"))))) ; ditto
      (build-system asdf-build-system/sbcl)
      (arguments
       '(#:tests? #f ; There are no tests.
         #:asd-systems '("cl-site-gen"))) ; TODO: add cl-site-gen/tests
      #;(native-inputs
        (list sbcl-rove)) ; There are no tests yet.
      (inputs
        (list sbcl-arrows
              sbcl-alexandria
              sbcl-fset
              sbcl-flute
              sbcl-cl-css))
      (home-page "https://github.com/Gavinok/cl-site-gen")
      (synopsis "Create Your Static Websites With Lisp")
      (description
"@code{cl-site-gen} is a simple static site generator for those crazy
enough to want to write their websites in CL.  This project is focused
on being simple and letting you determine how you want the site to look.
By default the project uses @code{cl-flute} for generating HTML but this can
configured by the user.")
      (license license:expat))))

(define-public cl-site-gen
  (sbcl-package->cl-source-package sbcl-cl-site-gen))

(define-public ecl-cl-site-gen
  (sbcl-package->ecl-package sbcl-cl-site-gen))
